﻿@model IList<WineStore.Models.AccountAdmin>
@{
    ViewBag.Title = "ShowAccount";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}
@section Styles
{
    <style type="text/css">
        td {
            text-align: center;
            vertical-align: middle;
        }
         
    </style>
}
<link href="../../Content/styletablesim.css" rel="stylesheet" />
<script src="../../Scripts/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
    $(function () {
        /* For zebra striping */
        $("table tr:nth-child(odd)").addClass("odd-row");
        /* For cell text alignment */
        $("table td:first-child, table th:first-child").addClass("first");
        /* For removing the last border */
        $("table td:last-child, table th:last-child").addClass("last");
    });
</script>
@section Scripts
{
    <!--Sử dụng cho row hover-->
    <script type="text/javascript">
        $(document).ready(function () {
            $("tr").not(':first').hover(function () {
                $(this).css("background", "#D1EEEE");
            }, function () {
                $(this).css("background", "");
            }
            );
        });
    </script>
}
<!-- Table (TABLE) -->
@if (Session["Admin"] != null)
{
    <h3 class="tit">Quản Lý Account
    </h3>
    <div style="color: Red; font-size: 13px;" id="update-message">
    </div>
    using (Html.BeginForm())
    {
    <table border="1px;" style="width:100%">
        <tr>
            <th>UserName
            </th>
            <th>Sự kiện
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr id="row-@item.AccountAdminId">
                <td>
                    @Html.DisplayFor(account => item.UserName)
                </td>
                <td>
                    @Html.ActionLink("Sửa", "EditAccount", new { id = item.AccountAdminId }, new { @class = "edit" })
                </td>
            </tr>
        }
    </table>
    }
}
else
{
    Response.Redirect("~/Admin/LogOn/");
}